<include file="Public:header" />
<!--主体内容-->
<!--左边-->
<div class="centent_box">
    <include file="Public:left" />
    <!--右边-->
    <div class="centent_right_box">
        <form action="{:U('Account/info')}" method="post" enctype="multipart/form-data">
       <div class="centent_right rightCon">
            <div class="topIntro"><span class="blue">亲爱的{$user.username}</span>, 填写真实资料我们会妥善保管您的信息，我们还会为您提供个性的区域服务，您参加搜房网各类活动时，我们能够更方便地与您取得联系</div>
           <div class="Mtit item3">
               <ul id="ul_li" style="position: relative">
                   <li class="on" data-bid="infodiv"><span>基本信息</span></li>
                   <li  data-bid="contactdiv"><span>联系方式</span></li>
                   <li data-bid="binddiv"><span>绑定设置</span></li>
               </ul>
           </div>
           <div class="itemCon userinfo" id="infodiv" style="display: block;">
               <ul class="formList width2">
                   <li>
                       <label>用户名：</label>
                       <input type="text" value="{$user.username}" disabled="disabled" class="inputStyle" id="username">
                   </li>
                   <li style="height: 100px;">
                       <label>当前头像：</label>
                       <img style="width: 100px;height: 90px;" src="{$info.head_ico}">
                   </li>
                   <li>
                       <label>上传头像：</label>
                       <input name="img" type="file">
                   </li>
                   <li>
                       <label>真实姓名：</label><input type="text" value="{$info.true_name}" class="inputStyle width2" name="info[true_name]" >
                       <span class="tip" id="nicknameTip">4-20个字符</span>
                   </li>
                   <li>
                       <label>性别：</label>
                       <div class="radioBox">
                           <label>
                               <input type="radio" <php>if($info['sex']==1){</php> checked <php>}</php> value="1" name="info[sex]">
                               男</label>
                           <label>
                               <input type="radio" <php>if($info['sex']==2){</php> checked <php>}</php> value="2" name="info[sex]">
                               女</label>
                       </div>
                   </li>
                   <li>
                       <label>生日：</label>
                       <select class="selectStyle" name="data[y]" id="selectYear">
                           <php>for($i=1900;$i< date("Y");$i++){</php>
                           <option <php>if($i==$data['y']){</php> selected="selected" <php>}</php> value="{$i}">{$i}</option>
                           <php>}</php>
                       </select>
                       <span class="spaceSpan">年</span>
                       <select class="selectStyle" name="data[m]" id="selectMonth">
                           <php>for($i=1;$i<13;$i++){</php>
                           <option <php>if($i==$data['m']){</php> selected="selected" <php>}</php> value="{$i}">{$i}</option>
                           <php>}</php>
                       </select>
                       <span class="spaceSpan">月</span>
                       <select class="selectStyle" name="data[d]" id="selectDay">
                           <php>for($i=1;$i<13;$i++){</php>
                           <option <php>if($i==$data['d']){</php> selected="selected" <php>}</php> value="{$i}">{$i}</option>
                           <php>}</php>
                       </select>
                       <span class="spaceSpan">日</span>
                   </li>
                   <li>
                       <label>证件类型：</label>
                       <select id="selectIDType" name="info[id_type]" class="selectStyle">
                           <volist name="conf['id_type']" id='vo'>
                               <option <php>if($info['id_type']==$key){</php> selected="selected" <php>}</php> value="{$key}">{$vo}</option>
                           </volist>
                       </select>
                   </li>
                   <li>
                       <label>证件号码：</label><input type="text" name="info[id_code]" value="{$info.id_code}" class="inputStyle" id="idcode"></li>
                   <li>
                       <label>教育程度：</label>
                       <select id="edu" name="info[edu_level]" class="selectStyle">
                           <option value="0">请选择</option>
                           <volist name="conf['edu']" id='vo'>
                           <option <php>if($info['edu_level']==$key){</php> selected="selected" <php>}</php> value="{$key}">{$vo}</option>
                           </volist>
                         </select>
                   </li>
                   <!--if condition="$info['cate_id'] gt 1" >
                       <li>
                           <label>请选择所属分组：</label>
                           <select id="job" name="info[group]" class="selectStyle">
                               <option value="0">请选择</option>
                               <volist name="groups" id='gr'>
                                   <option <php>if($gr['id']==$info[group]){</php> selected="selected" <php>}</php> value="{$gr['id']}">
                                   {$gr['shop_title']} : {$gr['title']}
                                   </option>
                               </volist>
                           </select>
                           &nbsp;<em style="color:red">(*必填*)</em>
                       </li>
                   </if-->

                   <li>
                       <label>公司名称：</label><input name="info[company_name]" style="width: 300px;" type="text" value="{$info.company_name}" class="inputStyle" ></li>
               </ul>
           </div>

           <!--联系信息-->
           <div style="display: none;" class="itemCon userinfo" id="contactdiv">
               <ul class="formList width2">
                   <li>
                       <label>联系地址：</label>
                       <input type="text" name="info[address]" value="{$info.address}" class="inputStyle">
                   </li>
                   <li>
                       <label>邮编：</label>
                       <input type="text" name="data[code]" value="{$data.code}"  class="inputStyle">
                   </li>
                   <li>
                       <label>购房热线：</label><input type="text" name="info[hot_line]" value="{$info.hot_line}" class="inputStyle" ></li>
                   <li>
                       <label>QQ：</label><input type="text" name="info[qq]" value="{$info.qq}" class="inputStyle" style="border: 1px solid rgb(204, 204, 204);"></li>
                   <li>
                       <label>MSN：</label><input type="text" name="data[msn]" value="{$data.msn}" class="inputStyle"></li>
                   <li>
                       <label>个人主页：</label><input type="text" name="info[website]" value="{$info.website}" class="inputStyle"></li>

                   <li class="noMar gray9">
                       <label></label>
                       <p>请正确填写您的联系方式，您参加{$site.title}各类活动时，我们能更方便的与您取得联系</p>
                   </li>
               </ul>
           </div>
           <div id="btnStyle">
               <ul  class="formList width2">
                   <li>
                       <label></label>
                       <input type="submit" class="btnStyle" value="确 定">
                   </li>
               </ul>
           </div>

           <!-- 绑定设置-->
            <div style="display: none" class="itemCon userinfo" id="binddiv">
                <dl class="bdList">
                    <dt>绑定第三方网站，使用第三方账号就可以直接登录{$site.title}。</dt>
                    <dd>
                        <div class="picBox">
                            <img width="68" height="68" src="__IMG__/weibo_icon.gif">
                        </div>
                        <p>
                            <php>if(!$binding['sina']){</php>
                            你还未绑定新浪微博
                            <a class="btnlink ml20" target="_blank" href="{:U('Login/login',array('type'=>'sina'))}">连接绑定</a>
                            <php>}else{</php>
                            你已经绑定新浪微博,可以直接通过新浪微博登录会员
                            <php>}</php>
                        </p>
                        <p class="f12 gray9">绑定以后，就可以用微博账号直接登录{$site.title}啦</p>
                    </dd>
                    <dd>
                        <div class="picBox">
                            <img width="68" height="68" src="__IMG__/qq_icon.gif">
                        </div>
                        <p>
                            <php>if(!$binding['qq']){</php>
                            你还未绑定QQ登录
                            <a class="btnlink ml20" target="_blank" href="{:U('Login/login',array('type'=>'qq'))}">连接绑定</a>
                            <php>}else{</php>
                            你已经绑定QQ登录,可以直接通过QQ登录会员
                            <php>}</php>
                        </p>
                        <p class="f12 gray9">绑定以后，就可以用QQ账号直接登录{$site.title}啦</p>
                    </dd>
                </dl>
            </div>
       </div>
    </div>
    </form>
</div>
<script src="__S__/js/jquery.validate.js"></script>
<script type="text/javascript">
    $(function(){
        $("#info_form").validate({
            rules: {
                "data[phone]": {
                    required: true,
                    minlength: 6
                },
                "data[info]": {
                    required: true,
                    minlength: 2
                }
            },
            messages: {
                "data[phone]": {
                    required: "请输入联系电话",
                    minlength: "联系电话要输入正确哦"
                },
                "data[info]": {
                    required: "请输入详细内容",
                    minlength: "内容也要2个字符以上吧"
                }
            }
        });

        $("#ul_li li").click(function(){
            var v = $(this).attr("data-bid");
            if(v=='binddiv'){
                $("#btnStyle").hide();
            }else{
                $("#btnStyle").show();
            }
            $("#infodiv,#contactdiv,#binddiv").hide();
            $("#ul_li li").removeClass("on");
            $(this).addClass("on");
            $("#"+v).show();
        })

    });
</script>
<include file="Public:footer" />